/*
 * @Author: Lin Hongwei
 * @Date: 2022-09-09 22:23:05
 * @LastEditTime: 2022-10-09 23:01:45
 * @LastEditors: Lin Hongwei
 * @email: 1365755396@qq.com
 * @CSDN: https://blog.csdn.net/weixin_45429409
 * @Description: 整个项目context的Providers组件
 */
import { ReactNode } from "react";
import { AuthProvider } from "./auth-context";
import { QueryClientProvider, QueryClient } from "react-query"; //使用react-query导入provider
import { ReactQueryDevtools } from "react-query/devtools";
export const AppProvider = ({ children }: { children: ReactNode }) => {
  const queryClient = new QueryClient();
  return (
    <QueryClientProvider client={queryClient}>
      <AuthProvider>{children}</AuthProvider>
      <ReactQueryDevtools initialIsOpen={false} />
    </QueryClientProvider>
  );
};
